home *** CD-ROM | disk | FTP | other *** search
/ The Canadian & World Encyclopedia 1998 / The Canadian & World Encyclopedia 1998 - Disc 2.iso / mac / prime_CD / pb / PROFILE.DIR / 00040_Script_#rollover scripts < prev    next >
Text File  |  1997-07-29  |  32KB  |  1,100 lines

  1. global mousedown_cast, current_pm, nav_history, prev_frame, the_rolls, prof_rolls, sub_open, menusub_on, dopm, menusub_notgone, roll_scripts,vid_delay, stayinover, multi_sub,clearmenus,next_bsub, qtrep_return, iss_vid
  2.  
  3. on subwinpop obj_key
  4.   set the itemdelimiter to ","
  5.   set sub_open = 1 
  6.   pause
  7.   unload
  8.   
  9.   global pop_locs,b_sub_key
  10.   
  11.   
  12.   -- do popup for glossary entry
  13.   if item 1 of obj_key = "glo" then
  14.     put getprop(pop_locs,obj_key) into pop_rect
  15.     set the itemdelimiter to ","
  16.     continue
  17.     gloss_pop(item  2 of obj_key, the left of pop_rect, the top of pop_rect)
  18.     set vid_delay = FALSE
  19.     exit
  20.   end if
  21.   
  22.   -- do popup for video
  23.   if item 1 of obj_key = "vid" then
  24.     wrapwin(item 2 of obj_key)
  25.     puppetsprite 26,true
  26.     set the visible of sprite 26 = true
  27.     set vidcast = "vid_"&item 2 of obj_key
  28.     switchqt 26, the number of cast vidcast
  29.     patchpal
  30.     set bit_rect =  the rect of sprite 25
  31.     spriteBox 26, the left of bit_rect + 21, the top of bit_rect + 20,the left of bit_rect + the width of member "bi_dummy" + 21,the top of bit_rect + the height of member "bi_dummy" +20
  32.     puppettempo 30
  33.     continue
  34.     updatestage
  35.     
  36.     -- **** beginning of view in context code: line 17 used to keep track of context **** --
  37.     -- set x = "prp_"&item 2 of obj_key
  38.     --    put the framelabel into line 17 of field x
  39.     exit
  40.   end if
  41.   
  42.   -- do text subwin
  43.   if item 1 of obj_key = "txt" then
  44.     see_sprite([26,43],false)
  45.     wrapwin("sub_text","text")
  46.     
  47.     set bit_rect = getaprop(pop_locs,"sub_text")
  48.     puppetsprite 38,true
  49.     set tfield = "txt_"&item 2 of obj_key
  50.     put the text of field tfield into field "sub_win text II"
  51.     set the castnum of sprite 38 = cast "sub_win text II"
  52.     spriteBox 38, the right of bit_rect - 212, the top of bit_rect + 18, the right of bit_rect, the bottom of bit_rect
  53.     
  54.     set the rect of cast "sub_win text II" = rect(0,0,187,((the bottom of bit_rect - 28) - (the top of bit_rect + 18)))
  55.     if the ink of sprite 38 <> 36 then set the ink of sprite 38 = 36
  56.     set the visible of sprite 38 = true
  57.     
  58.     puppetsprite 40,true
  59.     puppetsprite 41,true
  60.     set the_center = (the right of bit_rect - the left of bit_rect) / 2
  61.     
  62.     spritebox 40, the left of bit_rect + the_center - 25, the bottom of bit_rect - 23,the left of bit_rect + the_center - 25 + the width of sprite 40, the bottom of bit_rect - 23 + the height of sprite 40
  63.     spritebox 41, the left of bit_rect + the_center + 5, the bottom of bit_rect - 23, the left of bit_rect + the_center + 5 + the width of sprite 41, the bottom of bit_rect - 23 + the height of sprite 41  
  64.     see_sprite([40,41],true)
  65.     see_sprite([26,43],false)
  66.     set vid_delay = FALSE
  67.     
  68.     -- view in context code : preliminary -- 
  69.     --    set x = "prp_"&item 2 of obj_key
  70.     --    put the framelabel into line 17 of field x
  71.     continue
  72.     exit
  73.   end if
  74.   
  75.   -- do popup for audio
  76.   if the casttype of cast obj_key = #bitmap then
  77.     unload
  78.     wrapwin(obj_key)
  79.     put "snd_"&obj_key into cname
  80.     switchqt 26, the number of cast cname
  81.     set the visible of sprite 26 = true
  82.     set the volume of sprite 26 = 255
  83.     set  the pausedAtStart of cast cname = true
  84.     continue
  85.     puppettempo 30
  86.     updatestage
  87.     if the ink of sprite 38 = 36 then set the ink of sprite 38 = 0
  88.     exit
  89.   end if
  90.   
  91.   
  92.   
  93.   
  94.   if item 1 of obj_key = "msub" then
  95.     set_puppets([26],true)
  96.     set the visible of sprite 26 = true
  97.     
  98.     set psp = the rect of sprite 35
  99.     set prew = the rect of sprite 43
  100.     set psptop = getprop(pop_locs, item 2 of obj_key)
  101.     spriteBox 35, the left of psp, psptop, the right of psp, psptop + the height of sprite 35
  102.     spriteBox 43, the left of prew, psptop, the right of prew, psptop + the height of sprite 43
  103.     
  104.     set b_sub_key = item 2 of obj_key
  105.     if the visible of sprite 38 = TRUE then fillbox(b_sub_key)
  106.     
  107.     subaudio("snd_"&item 2 of obj_key)
  108.     updatestage
  109.     
  110.   end if
  111.   
  112. end
  113.  
  114. on dumpcast start, end, cl
  115.   set  var = ""
  116.   repeat with x = start to end
  117.     put the name of member x of castlib cl & return after var
  118.   end repeat
  119.   --  put var
  120. end
  121.  
  122. on vid_on
  123.   set iss_vid = 1
  124. end 
  125.  
  126.  
  127. on setqt mcast
  128.   global mp, gsep
  129.   put mcast&".mov" into fname
  130.   set p to mp&"moovs"&gsep
  131.   set mcast to "vid_"&mcast
  132.   set the filename of member mcast of castlib "shared" to p&fname
  133.   updatestage
  134. end
  135.  
  136.  
  137. on findcw pm
  138.   vid_on
  139.   set qtrep_return = string(current_pm)&"issw"
  140.   
  141.   set tomark = string(current_pm)&",CWv"
  142.   
  143.   pause
  144.   
  145.   if pm < 10 then
  146.     setqt("0"&string(pm)&"CWV")
  147.   else
  148.     setqt(string(pm)&"CWV")
  149.   end if
  150.   
  151.   preload frame marker(tomark)
  152.   go to frame marker(tomark)
  153.   continue
  154.   
  155.   set the controller of cast the castnum of sprite 22 to false
  156.   handcurse the clickon
  157.   qtstart 22
  158.   qt_wait 22, tomark
  159.   bail 22
  160.   
  161. end
  162.  
  163. on findnu pm
  164.   vid_on
  165.   set qtrep_return = string(current_pm)&"issw"
  166.   set tomark = string(current_pm)&",NUv"
  167.   
  168.   pause
  169.   
  170.   if pm < 10 then
  171.     setqt("0"&string(pm)&"NUV")
  172.   else
  173.     setqt(string(pm)&"NUV")
  174.   end if
  175.   
  176.   preload frame marker(tomark)
  177.   go to frame marker(tomark)
  178.   
  179.   continue
  180.   
  181.   set the controller of cast the castnum of sprite 22 to false
  182.   handcurse the clickon
  183.   qtstart 22
  184.   qt_wait 22, tomark
  185.   bail 22
  186.   
  187. end
  188.  
  189.  
  190.  
  191. on findnb pm
  192.   vid_on
  193.   set qtrep_return = string(current_pm)&"issw"
  194.   
  195.   
  196.   set tomark = string(pm)&",NBv"
  197.   
  198.   pause
  199.   
  200.   if pm < 10 then
  201.     setqt("0"&string(pm)&"NBV")
  202.   else
  203.     setqt(string(pm)&"NBV")
  204.   end if
  205.   
  206.   
  207.   preload frame marker(tomark)
  208.   go to frame marker(tomark)
  209.   continue
  210.   
  211.   set the controller of cast the castnum of sprite 22 to false
  212.   handcurse the clickon
  213.   qtstart 22
  214.   qt_wait 22, tomark
  215.   bail 22
  216.   
  217. end
  218.  
  219. on imp_load imp_frame
  220.   if menusub_notgone = 0 then
  221.     waitcursor the clickon
  222.     if voidp(imp_frame) then 
  223.       put current_pm into item 1 of imp_sc
  224.       put "im" into item 2 of imp_sc
  225.     else
  226.       set imp_sc = imp_frame  
  227.       set imp_it = TRUE
  228.       set_puppets([24,29],false)
  229.       puppetsprite 23, true
  230.       see_sprite([1,2,4,9,10,11,12,13,15,16,17,18,19,20,21,22,23,24,25,27,28,29],TRUE)
  231.     end if
  232.     
  233.     put the frame into prev_frame
  234.     
  235.     if soundbusy(1) then 
  236.       sound fadeOut 1, 30
  237.     end if
  238.     
  239.     pause
  240.     imp_loadqts(current_pm)
  241.     continue
  242.     
  243.     puppettransition 01,4,6
  244.     go to frame marker(string(imp_sc))
  245.     --      set the controller of sprite 26 to false
  246.     puppetsprite 26,false
  247.     see_sprite([26],true)
  248.     if the type of sprite 26 <> 0 then
  249.       if the casttype of cast the castnum of sprite 26 = #digitalvideo then set the volume of sprite 26 = 255
  250.     end if
  251.     set_cursors(profimps_rolls)
  252.     cursor 0
  253.   end if
  254.   
  255. end
  256.  
  257. on imp_loadqts pm
  258.   -- this handler sets the filenames for all the linked media in impressions.
  259.   if the timer > 10 then
  260.     case pm of
  261.       1 : set flist to ["01im15v", "01im5s", "01im6s", "01im7s", "01im9s"] 
  262.       7 : set flist to ["07im10s", "07im11s", "07im12s", "07im14s", "07im1v", "07im2s", "07im3s", "07im4s", "07im6s", "07im7s", "07im9s"]
  263.       10 : set flist to ["10im11s", "10im15s", "10im1s", "10im4s", "10im5s", "10im6s", "10im7s", "10im8s", "10im9s"]
  264.       13 : set flist to ["13im10s", "13im11s", "13im12s", "13im14s", "13im15s", "13im1s", "13im2v", "13im4v", "13im5s", "13im5s", "13im7s", "13im8s"]
  265.       14 : set flist to ["14im11s", "14im12s", "14im14s", "14im15s", "14im16s", "14im1s", "14im3v", "14im5v", "14im4s", "14im6s", "14im7s", "14im8s", "14im9s"]
  266.       15 : set flist to ["15im10s", "15im11s", "15im12s", "15im13s", "15im14s", "15im15s", "15im16v", "15im1s", "15im2v", "15im3s", "15im4v", "15im5s", "15im6s", "15im7s", "15im8s", "15im9v"]
  267.       18 : set flist to ["18im10s", "18im11s", "18im12s", "18im13s", "18im14s", "18im16s", "18im1s", "18im2v", "18im3s", "18im5s", "18im6s", "18im7s", "18im9v"] 
  268.     end case
  269.     
  270.     global gsep,mp
  271.     
  272.     repeat with x in flist
  273.       set t to char length(x) of x
  274.       case t of
  275.         "v": 
  276.           set mdir to "moovs"
  277.           set pref to "vid_"
  278.         "s": 
  279.           set mdir to "snd"
  280.           set pref to "snd_"
  281.       end case
  282.       
  283.       set p to mp&mdir&gsep&x&".mov"
  284.       set m to pref&x
  285.       set the filename of member m to p
  286.       preload member m of castlib "shared"
  287.       --    set the pausedAtStart of member m of castlib "shared" to true
  288.     end repeat
  289.   end if
  290.   
  291.   starttimer
  292. end
  293.  
  294.  
  295. on bio_load next_bpage
  296.   waitcursor the clickon
  297.   if menusub_notgone = 0 then
  298.     
  299.     if clearmenus = TRUE then exit
  300.     
  301.     if voidp(next_bpage) then
  302.       set next_bsub = ""
  303.       put current_pm into item 1 of next_bsub
  304.       put "bio" into item 2 of next_bsub
  305.       put 1 into item 3 of next_bsub
  306.     else
  307.       set next_bsub = next_bpage
  308.     end if
  309.     
  310.     --    put the frame into prev_frame
  311.     
  312.     
  313.     getbiolist 
  314.     
  315.     see_sprite([15],false)
  316.     if soundbusy(1) then 
  317.       sound fadeOut 1, 30
  318.     end if
  319.     
  320.     dobiorolls(item 3 of next_bsub) -- set the rolls for each bio screen
  321.     global credit_roll
  322.     put setbiocredit(current_pm) into credit_roll
  323.     
  324.     
  325.     puppettransition 01,2,16
  326.     go to frame marker(string(next_bsub))
  327.     
  328.     sound stop 1
  329.     puppetsprite 23,false
  330.     
  331.     set_cursors(profbio_rolls)
  332.     
  333.     bio_sub_on
  334.   end if
  335. end
  336.  
  337. on subwin_load b_sub
  338.   set the cursor of sprite 3 = 4
  339.   subwinpop(b_sub)
  340.   set the cursor of sprite 3 = 0
  341.   global biosub_rolls 
  342.   set_cursors(biosub_rolls)
  343.   if item 1 of b_sub <> "glo" and item 1 of b_sub <> "txt" then  
  344.     viddelay_play 26
  345.     set the castnum of sprite 35 = cast "PAUSE.PCT"
  346.     puppettempo 30
  347.   end if
  348. end
  349.  
  350.  
  351. on over_loadqts id
  352.   if the timer > 10 then
  353.     global gsep, mp
  354.     set tmp to id
  355.     delete char 1 to 4 of tmp
  356.     set fname to tmp&".mov"
  357.     set p to mp&"moovs"&gsep&fname
  358.     set the filename of member id of castlib "shared" to p
  359.   end if
  360.   starttimer
  361. end
  362.  
  363.  
  364. on over_load
  365.   if menusub_notgone = 0 then
  366.     waitcursor the clickon
  367.     sound stop 1
  368.     
  369.     pause
  370.     if current_pm < 10 then
  371.       
  372.       set vid = "vid_0"¤t_pm & "over"
  373.       set pnum to string("0")¤t_pm
  374.       over_loadqts(string(vid))
  375.     else
  376.       set vid = "vid_"¤t_pm & "over"
  377.       over_loadqts(string(vid))
  378.     end if
  379.     
  380.     --    over_loadqts(current_pm)
  381.     
  382.     set the controller of member vid to false
  383.     preloadmember member vid
  384.     put current_pm into item 1 of dest
  385.     put "over" into item 2 of dest
  386.     put the frame into prev_frame
  387.     
  388.     go to frame marker(string(dest))
  389.     
  390.     set_cursors(profover_rolls)
  391.     
  392.     set sub_open = 1
  393.     set sub_over = 1
  394.     
  395.     continue
  396.     
  397.   end if
  398. end
  399.  
  400. on gobackone
  401.   if voidp(getlast(nav_history)) <> 1 then 
  402.     go to getlast(nav_history)
  403.     deleteat nav_history getpos(nav_history,getlast(nav_history))
  404.   else
  405.     alert "There is nowhere to go back to."
  406.   end if
  407.   
  408. end
  409.  
  410.  
  411. on viddelay sp
  412.   set vid_delay = TRUE
  413.   if 1 = 2 then -- turn off temporarily
  414.     set the movietime of sprite sp = 0
  415.     set the movierate of sprite sp = 0
  416.   end if
  417.   set stayinover = TRUE
  418.   starttimer
  419. end
  420.  
  421. on viddelay_play sp
  422.   if sub_open = TRUE then
  423.     set the movierate of sprite sp = 1
  424.     set vid_delay = FALSE
  425.     global vidplay, vidstate,endplay
  426.     set endplay = 1
  427.     set vidplay = 1
  428.     set vidstate = 1
  429.     set stayinover = 0
  430.     starttimer
  431.   end if
  432. end
  433.  
  434.  
  435. on doimp inum
  436.   set fl = current_pm&","&"im,"&inum
  437.   
  438.   go to string(fl)
  439. end
  440.  
  441.  
  442.  
  443. on buildterm glossterm
  444.   put glossterm  
  445. end
  446.  
  447. on more_arrow sp, acast
  448.   set the castnum of sprite sp = cast acast
  449. end
  450.  
  451. on subaudio sndname
  452.   set the castnum of sprite 26 = cast sndname
  453.   set the movietime of sprite 26 = 0
  454.   set the movierate of sprite 26 = 1
  455.   updatestage
  456. end
  457.  
  458.  
  459.  
  460.  
  461. on wrapwin obj_key, exception
  462.   -- generic wrapwindow code
  463.   
  464.   set_puppets([25,27,28,29,30,31,32,33,34,35,36,37,43],true)
  465.   
  466.   see_sprite([25,27,28,29,30,31,32,33,34,35,36,37,43],true)
  467.   
  468.   if exception = "text" then
  469.     see_sprite([26,35,36,43],false)
  470.   end if
  471.   
  472.   global pop_locs
  473.   
  474.   set bit_rect = getaprop(pop_locs,obj_key)
  475.   set the castnum of sprite 25 = the number of cast obj_key
  476.   spritebox 25, the left of bit_rect, the top of bit_rect, the right of bit_rect, the bottom of bit_rect
  477.   
  478.   set list to [27,28,29,30,31,32,33,34,35,36,37,43]
  479.   wrapmedia(obj_key,25,list,bit_rect)
  480.   
  481.   if exception <> "text" then
  482.     more_arrow 36, "dropdown" -- this needs a direction handler
  483.   end if
  484.   
  485. end
  486.  
  487. on moveWindow windName, left_pos, top_pos, bool
  488.   set wr = the rect of windName
  489.   set sl = the left of the rect of the stage
  490.   set st = the top of the rect of the stage
  491.   set tr = left_pos + (the right of wr - the left of wr)
  492.   set tb = top_pos + (the bottom of wr - the top of wr)
  493.   set the rect of windName = rect(sl + left_pos, st + top_pos, sl + tr, st + tb)
  494.   
  495.   set the windowType of windName to 2
  496.   --  set the modal of windName to bool
  497.   --  put windName&": "&the rect of windName into field "status"
  498.   set the visible of windName to bool
  499.   
  500. end
  501.  
  502. on doglossterm obj_key
  503.   set tmp = "glo_"&obj_key
  504.   set prp = "prp_"&obj_key
  505.   set the_term to line 2 of field prp
  506.   tell window "textpop.dir" to dogloss tmp, the_term
  507. end
  508.  
  509. on xglossit glossvar, title, gl, callback
  510.   tell window "textpop.dir"
  511.     put glossvar into field "display"
  512.     set the scrolltop of member "display" to 0
  513.     put title into field "term"
  514.     if not callback then setscroll gl
  515.   end tell
  516.   if not callback then tell window "textpop.dir" to hilite line integer(gl) of field "terms"
  517. end
  518.  
  519. on xdogloss the_line
  520.   set gfield = item 1 of line integer(the_line) of field "glosindx"
  521.   put field gfield of castlib "shared" into glossvar
  522.   set title = line the_line of field "glosindx"
  523.   delete item 1 of title
  524.   set callback to true
  525.   glossit glossvar, title, the_line, callback
  526.   
  527. end
  528.  
  529.  
  530. on gloss_pop term, the_left, the_top
  531.   cursor 4
  532.   
  533.   doglossterm(term)
  534.   
  535.   set tmp to "glo_"&term
  536.   put "glossary: "& term
  537.   movewindow window "textpop.dir", the_left, the_top, true
  538.   
  539.   set the visible of window "textpop.dir" = true
  540.   tell window "textpop.dir"
  541.     global linelist
  542.     set tpos to getpos(linelist, tmp)
  543.     put "" before line tpos of field "terms"
  544.     if tpos > 0 then
  545.       hilite line tpos of field "terms"
  546.       set tpos to 0
  547.     end if
  548.     starttimer
  549.   end tell
  550.   global glossontop
  551.   set glossontop to true
  552.   cursor 0  
  553.   
  554. end
  555.  
  556. on prof_stuff_off
  557.   set the visible of sprite 5 = false
  558.   set the visible of sprite 6 = false
  559.   set the visible of sprite 7 = false
  560.   set the visible of sprite 8 = false
  561. end
  562.  
  563. on pop_menu
  564.   go to "pmtop"
  565. end
  566.  
  567. on leave_iss tc
  568.   set curse to the cursor of sprite the clickon
  569.   set the cursor of sprite the clickon to 4
  570.   global imp_it,sub_open
  571.   set sub_open = 0
  572.   set imp_it = 0
  573.   set_puppets([19,24,35,39],false)
  574.   --  set the_rolls = prof_rolls
  575.   global iss_vid
  576.   set iss_vid = 0
  577.   unload
  578.   puppettransition 01,02,12
  579.   go to prev_frame
  580.   set the cursor of sprite the clickon to curse
  581.   set_cursors(prof_rolls)
  582. end
  583.  
  584. on leave_bio
  585.   waitcursor the clickon
  586.   addtohistory (the frame) 
  587.   delay 60
  588.   if the casttype of cast the castnum of sprite 26 = #digitalvideo then
  589.     set the movierate of sprite 26 = 0
  590.     set the movietime of sprite 26 = 0
  591.   end if
  592.   
  593.   set_puppets([25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],false)
  594.   
  595.   
  596.   set sub_open = 0
  597.   unload
  598.   
  599.   puppettransition 01,02,16
  600.   go to prev_frame
  601.   see_sprite([15,25,27,28],true)
  602.   --  set the_rolls = prof_rolls
  603.   set_cursors(prof_rolls)
  604.   set the cursor of sprite the clickon = 0
  605. end
  606.  
  607.  
  608. on leave_over
  609.   waitcursor the clickon
  610.   addtohistory(the frame) 
  611.   delay 60
  612.   set the movierate of sprite 3 = 0
  613.   set the visible of sprite 20 = TRUE
  614.   set_puppets([18,29,30,32,32,33,34,35,36,37,40],false)
  615.   unload
  616.   puppettransition 51,02,12
  617.   go to prev_frame
  618.   set the visible of sprite 3 = true
  619.   set sub_open = 0
  620.   set sub_over = 0
  621.   set stayinover = 0
  622.   set_cursors(prof_rolls)
  623.   set the visible of sprite 20 = FALSE
  624.   cursoroff(the clickon)
  625. end
  626.  
  627. on shift_up
  628.   set sp = the clickon
  629.   set the locv of sprite sp = the locv of sprite sp - 1
  630.   set the loch of sprite sp = the loch of sprite sp - 1
  631.   updatestage
  632. end
  633.  
  634. on shift_down_left
  635.   set sp = the clickon
  636.   set the locv of sprite sp = the locv of sprite the clickon + 1
  637.   set the loch of sprite sp = the loch of sprite the clickon - 1
  638.   updatestage
  639.   repeat while the mousedown = TRUE
  640.     nothing
  641.   end repeat
  642.   set the locv of sprite sp = the locv of sprite sp - 1
  643.   set the loch of sprite sp = the loch of sprite sp + 1
  644.   
  645. end
  646.  
  647. on shift_down
  648.   --  puppetsound "butt.aif"
  649.   set the locv of sprite the clickon =   the locv of sprite the clickon + 1
  650.   set the loch of sprite the clickon =   the loch of sprite the clickon + 1
  651.   updatestage
  652.   repeat while the mousedown = TRUE
  653.     nothing
  654.   end repeat
  655.   shift_up
  656. end
  657.  
  658. on prof_stuff_on
  659.   
  660.   repeat with x = 5 to 8
  661.     set the visible of sprite x = true
  662.     puppettransition 51,1,3,true
  663.     go the frame
  664.   end repeat
  665.   
  666.   --  dates_on
  667. end
  668.  
  669. on bio_sub
  670.   set mousedown_cast = "over close down"
  671.   --  setcursor("biosub")
  672. end
  673.  
  674. on bio_sub_on
  675.   set_puppets([25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],true)
  676.   --  
  677.   --  set the visible of sprite 47 = false  
  678.   --  hide_textpop
  679.   if the type of the member of sprite 26 = #digitalvideo then 
  680.     set the movierate of sprite 26 = 0
  681.   end if -- test added by kf prs 11/21/96
  682. end
  683.  
  684. on bio_sub_off
  685.   cursor 4
  686.   if the castnum of sprite 26 <> 0 then
  687.     if the casttype of cast the castnum of sprite 26 = #digitalvideo then
  688.       set the movierate of sprite 26 = 0
  689.       set the movietime of sprite 26 = 0
  690.     end if
  691.   end if
  692.   box_sprites_off(38,39,40,41,42)
  693.   --  see_sprite([38,39,40,41,42,43],false)
  694.   set_puppets([23, 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],false) -- 23 added by KF PRS 11/25/96
  695.   updatestage
  696.   --  hide_textpop
  697.   set sub_open = 0
  698.   cursor 0
  699. end
  700.  
  701. on set_puppets plist, bool
  702.   if bool = "off" then 
  703.     set plist = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48]
  704.     set bool = false
  705.   end if
  706.   repeat with x in plist
  707.     puppetsprite x, bool
  708.   end repeat
  709. end
  710.  
  711.  
  712.  
  713.  
  714. on bio_sub_hide
  715.   global multi_sub, vidplay
  716.   if the timer > 90 then 
  717.     
  718.     if string(the windowlist) contains "textp" then 
  719.       if the visible of window "textpop.dir" = 1 then hide_textpop
  720.     end if
  721.     if not (sub_open = 0) then 
  722.       set sub_open = 0
  723.       set vidplay = 0
  724.       set the movierate of sprite 26 = 0
  725.       set the movietime of sprite 26 = 0
  726.       
  727.       if the framelabel contains "bio" then
  728.         set the cursor of sprite 18 to [member "hand", member "hand mask"]
  729.         set the cursor of sprite 19 to [member "hand", member "hand mask"]
  730.       end if
  731.       set_puppets([25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],false)
  732.       
  733.       if item 1 of the name of cast (the castnum of sprite 26) = "snd" then  set the visible of sprite 26 = true
  734.       
  735.       set the castnum of sprite 37 = cast "over close up"
  736.       --      puppettransition 01, 02,16
  737.       go the frame
  738.     end if
  739.   end if
  740. end
  741.  
  742. on cursor_busy
  743.   cursor 4
  744. end
  745.  
  746. on do_menu
  747.   set mousedown_cast =  "leaf down"
  748. end
  749.  
  750. on do_prev
  751.   set mousedown_cast = "sh_prev down"
  752. end
  753.  
  754. on do_next
  755.   set mousedown_cast =  "next down"
  756.   -- alert "next page"
  757.   --  put "next page" into field "status"
  758.   
  759. end
  760.  
  761. on handcursor
  762.   cursor [the membernum of member "hand",the membernum of member "hand mask"]  
  763. end
  764.  
  765. on close_overview
  766.   cursor_busy
  767.   set mousedown_cast = "over close down"
  768. end
  769.  
  770. on close_bio
  771.   set mousedown_cast = "close down" 
  772.   handcursor
  773.   
  774. end
  775.  
  776. on bio_prev
  777.   set mousedown_cast = "bio prev down"
  778.   handcursor
  779.   
  780. end
  781.  
  782. on bio_next
  783.   set mousedown_cast = "bio next down"
  784.   handcursor
  785. end
  786.  
  787. on go_to_era spritenum
  788.   set mousedown_cast = "sh_era dim"
  789.   --  put "era" into field "status"
  790. end
  791.  
  792. on go_to_archive spritenum
  793.   
  794.   cursor_busy
  795.   set mousedown_cast = "sh_archive dim"
  796.   
  797.   --  put "archive" into field "status"
  798. end
  799.  
  800. on do_hilite sp, hilite_cast,not_hilite_cast
  801.   set the castnum of sprite sp = hilite_cast
  802.   
  803.   updatestage
  804.   repeat while rollover(sp)
  805.     if the mousedown then exit repeat
  806.     
  807.     nothing
  808.   end repeat
  809.   set the castnum of sprite sp = not_hilite_cast
  810. end
  811.  
  812. on pm_over spritenum
  813.   set mousedown_cast = "sh_over down"
  814.   --  do_hilite spritenum, cast "sh_over lit", cast "sh_over"
  815.   
  816. end
  817.  
  818. on tsr sp -- utility script
  819.   --  put the rect of sprite sp
  820. end
  821.  
  822. on pm_bio spritenum
  823.   set mousedown_cast = "sh_bio down"
  824.   --  do_hilite spritenum, cast "sh_bio lit", cast "sh_bio"
  825.   --  put "pm_bio" into field "status"
  826. end
  827.  
  828. on pm_imp spritenum
  829.   set mousedown_cast = "sh_impressions down"
  830.   --  do_hilite spritenum, cast "sh_impressions lit", cast "sh_impressions"
  831.   --  put "pm_imp" into field "status"
  832. end
  833.  
  834. on pm_search
  835.   alert "search stuff goes here."
  836. end
  837.  
  838. on pmquit
  839.   alert "It was a very haaaaard decision to make....."
  840.   quit
  841. end
  842.  
  843.  
  844.  
  845. on menuprep_pm pm
  846.   global clearmenus
  847.   set current_pm = pm
  848.   set clearmenus = TRUE
  849.   set  menusub_notgone = 1
  850.   if the colordepth > 8 then
  851.     set pal = "pal,"&string(pm)
  852.     puppetpalette pal
  853.   end if
  854.   --  hidemenuwindows
  855. end
  856. on findblack pm
  857.   
  858. end
  859.  
  860.  
  861.  
  862. on qtdisable sp
  863.   if the membernum of sprite sp <> 0 then
  864.     if the casttype of cast the castnum of sprite sp = #digitalvideo then
  865.       set stayinover = 1
  866.       set the movierate of sprite sp  = 0
  867.       set the visible of sprite sp = FALSE
  868.       updatestage
  869.     end if
  870.   end if
  871. end
  872.  
  873. on qtenable sp, playtoggle
  874.   
  875.   set the visible of sprite sp = TRUE
  876.   
  877.   if not voidp(playtoggle) then 
  878.     set the movierate of sprite sp = playtoggle
  879.     set the castnum of sprite 18 = cast "over play"
  880.   end if
  881.   
  882.   updatestage
  883.   set stayinover = 0
  884. end
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893. on pm_iss spritenum
  894.   set mousedown_cast = "sh_issues down"
  895.   --  do_hilite spritenum, cast "sh_issues lit", cast "sh_issues"
  896.   --  put "pm_iss" into field "status"
  897. end
  898.  
  899. on trackButton spriteNumber, altCast
  900.   
  901.   put the castNum of sprite spriteNumber into baseCast
  902.   
  903.   if spriteNumber > 0 then
  904.     puppetsound 0
  905.     repeat while soundbusy(0)
  906.     end repeat
  907.     --    puppetsound "butt.aif"
  908.     repeat while the mouseDown
  909.       if rollover(spriteNumber) then
  910.         set the castNum of sprite spriteNumber to altCast
  911.       else set the castNum of sprite spriteNumber to baseCast
  912.       updateStage
  913.     end repeat 
  914.     return rollover(spriteNumber)
  915.   end if
  916.   puppetsound 0
  917.   repeat while soundbusy(1)
  918.   end repeat
  919. end
  920.  
  921.  
  922. on dobiorolls biopage
  923.   global bio_rolls,bio_pops,virtualrolloverlist,pop_locs
  924.   put getat(bio_rolls, integer(biopage)) into virtualrolloverlist
  925.   put getat(bio_pops,integer(biopage)) into pop_locs
  926.   
  927. end
  928.  
  929. on setbiopagetext
  930.   global current_pm
  931.   case current_pm of
  932.     1 : set tmp = ["txt_1bio1t": rect(30, 132, 324, 430), "txt_1bio2t": rect(33, 97, 380, 374), "txt_1bio3t": rect(39, 67, 604, 271),"txt_1bio4t": rect(29, 129, 347, 435), "txt_1bio5t": rect(281, 87, 605, 369),"txt_1bio6t": rect(323, 93, 608, 396),"txt_1bio7t": rect(41, 84, 293, 414),"txt_1bio8t": rect(41, 71, 293, 443),"txt_1bio9t": rect(302, 65, 602, 425)]
  933.       
  934.     2 : set tmp = ["txt_2bio1t": rect(302,99,593,300), "txt_2bio2t": rect(344,72,602,414), "txt_2bio3t": rect(26,78,287,441), "txt_2bio4t": rect(25,101,267,421)]
  935.       
  936.     3: set tmp = ["txt_3bio1t": rect(354, 98, 609, 343), "txt_3bio2t": rect(23, 94, 260, 424), "txt_3bio3t": rect(357, 93, 609, 410), "txt_3bio4t": rect(356, 121, 599, 361)]
  937.       
  938.     4 :  set tmp = ["txt_4bio1t": rect(31,102,398,395), "txt_4bio2t": rect(22,52,609,233), "txt_4bio3t": rect(24,315,608,447)]
  939.       
  940.     5 : set tmp = ["txt_5bio1t": rect(308,101,581,359), "txt_5bio2t": rect(374,95,605,359), "txt_5bio3t": rect(317,86,605,395)]
  941.       
  942.     6 : set tmp = ["txt_6bio1t": rect(326,68,608,422), "txt_6bio2t": rect(26,80,308,422), "txt_6bio3t": rect(23,53,608,203)]
  943.       
  944.     7 : set tmp = ["txt_7bio1t": rect(357, 71, 602, 413), "txt_7bio2t": rect(35, 86, 302, 407), "txt_7bio3t": rect(326, 53, 608, 429), "txt_7bio4t": rect(23, 53, 292, 446), "txt_7bio5t": rect(308, 93, 602, 391), "txt_7bio6t": rect(313, 80, 604, 395), "txt_7bio7t": rect(24, 53, 277, 447), "txt_7bio8t": rect(324, 97, 601, 413)]
  945.       
  946.     8: set tmp = ["txt_8bio1t": rect(310,91,603,403), "txt_8bio2t": rect(41,125,315,365), "txt_8bio3t": rect(32,245,601,429), "txt_8bio4t": rect(335,54,609,430), "txt_8bio5t": rect(296,112,585,355), "txt_8bio6t": rect(326,79,609,394)]
  947.       
  948.     9 : set tmp = ["txt_9bio1t": rect(314,56,611,446), "txt_9bio2t": rect(23,80,314,425), "txt_9bio3t": rect(41,107,314,398), "txt_9bio4t": rect(308,107,608,395)]
  949.       
  950.     10 : set tmp = ["txt_10bio1t": rect(356,84,609,412), "txt_10bio2t": rect(305,88,604,315), "txt_10bio3t": rect(23, 119, 269, 410), "txt_10bio4t": rect(29, 116, 311, 395), "txt_10bio5t": rect(341, 71, 608, 422), "txt_10bio6t": rect(20, 50, 608, 221), "txt_10bio7t": rect(353, 53, 608, 446), "txt_10bio8t": rect(365, 95, 608, 416), "txt_10bio9t": rect(298,105,609,420)]
  951.       
  952.     11 : set tmp = ["txt_11bio1t": rect(329,98,608,335), "txt_11bio2t": rect(23,107,275,401), "txt_11bio3t": rect(23,53,275,446), "txt_11bio4t": rect(32,282,599,446)]
  953.       
  954.     12 : return ["txt_12bio1t" : rect(35,101,284,387),"txt_12bio2t" : rect(25,294,609,448),"txt_12bio3t" : rect(33,96,300,417), "txt_12bio4t" : rect(25,71,303,435)]   
  955.       
  956.     13 : set tmp = ["txt_13bio1t": rect(332, 83, 608, 416), "txt_13bio2t": rect(23, 80, 308, 434), "txt_13bio3t": rect(23, 86, 326, 413), "txt_13bio4t": rect(23, 71, 266, 440), "txt_13bio5t": rect(281, 86, 608, 329), "txt_13bio6t": rect(23, 206, 608, 428), "txt_13bio7t": rect(23, 50, 284, 449), "txt_13bio8t": rect(23, 290, 611, 449), "txt_13bio9t": rect(212, 71, 608, 272)]
  957.       
  958.     14 : set tmp = ["txt_14bio1t": rect(293, 89, 602, 404), "txt_14bio2t": rect(311, 98, 608, 407), "txt_14bio3t": rect(335, 53, 608, 428), "txt_14bio4t": rect(338, 77, 608, 410), "txt_14bio5t": rect(362, 92, 608, 389), "txt_14bio6t": rect(215, 59, 437, 422), "txt_14bio7t": rect(26, 83, 311, 425), "txt_14bio8t": rect(23, 161, 320, 404)]
  959.       
  960.     15: set tmp = ["txt_15bio1t": rect(320, 98, 608, 377), "txt_15bio2t": rect(23, 269, 608, 446), "txt_15bio3t": rect(23, 302, 608, 446), "txt_15bio4t": rect(347, 83, 596, 413), "txt_15bio5t": rect(23, 83, 281, 431), "txt_15bio6t": rect(23, 302, 608, 446), "txt_15bio7t": rect(23, 293, 608, 446), "txt_15bio8t": rect(356, 89, 608, 389), "txt_15bio9t": rect(266, 74, 608, 410)]
  961.       
  962.     16: set tmp = ["txt_16bio1t": rect(29, 313, 604, 430), "txt_16bio2t": rect(361, 135, 609, 413), "txt_16bio3t": rect(23, 266, 608, 430), "txt_16bio4t": rect(360, 77, 609, 409)]
  963.       
  964.     17 : set tmp = ["txt_17bio1t": rect(332,95,608,389), "txt_17bio2t": rect(25,117,305,439), "txt_17bio3t": rect(44,263,608,428)]
  965.       
  966.     18: set tmp = ["txt_18bio1t": rect(25, 327, 610, 447), "txt_18bio2t": rect(25, 126, 289, 348), "txt_18bio3t": rect(25, 105, 295, 399), "txt_18bio4t": rect(376, 54, 607, 447), "txt_18bio5t": rect(352, 150, 607, 354), "txt_18bio6t": rect(334, 54, 607, 447), "txt_18bio7t": rect(22, 78, 310, 396)]
  967.       
  968.     19: set tmp = ["txt_19bio1t": rect(289,120,567,394),"txt_19bio2t": rect(24,283,611,450),"txt_19bio3t": rect(357,61,609,429),"txt_19bio4t": rect(353,62,609,427)]
  969.       
  970.     20: set tmp = ["txt_20bio1t": rect(23, 297, 609, 430), "txt_20bio2t": rect(23, 73, 304, 437), "txt_20bio3t": rect(352, 121, 609, 400), "txt_20bio4t": rect(23, 119, 301, 422), "txt_20bio5t": rect(308,70,608,414)]
  971.       
  972.   end case
  973.   return tmp
  974. end
  975.  
  976. on getbiolist
  977.   global current_pm, bio_rolls, bio_pops, biotextprops
  978.   
  979.   put makebiorolls(current_pm) into bio_rolls
  980.   put makebiopops(current_pm) into bio_pops
  981.   
  982.   set biotextprops = setbiopagetext()
  983.   --  put bio_rolls
  984.   --  put bio_pops
  985.   -- pick a list (each list contains a separate list for each pages rollovers)
  986.   
  987.   
  988.   
  989. end
  990.  
  991. on domac_desktop
  992.   openxlib "FinderSw"
  993.   global hank
  994.   set hank to FinderSwitcher(mnew)
  995.   hank(mswitchtofinder)
  996.   closexlib "FinderSw"
  997. end
  998.  
  999. on unlink castst, castend
  1000.   if voidP(castLibName) then set castLibName = "internal"
  1001.   set reportList = [:]
  1002.   repeat with curCast =  castst to castend
  1003.     set theCastFileName = the filename of cast curCast
  1004.     set theCastName = the name of cast curCast
  1005.     if theCastFileName <> EMPTY then
  1006.       --      put curCast
  1007.       --      put theCastFileName
  1008.       importFileInto cast curcast, theCastFileName
  1009.       set the name of cast curcast = theCastName
  1010.       --      importFileInto member theCastName of castLib castLibName, theCastFileName
  1011.       --      setaprop reportList, the number of member theCastName of castLib
  1012.       --      castLibName, theCastFileName
  1013.     end if      
  1014.   end repeat
  1015.   --  put "castmember: file imported"
  1016.   put reportList
  1017. end
  1018.  
  1019. on dopc_desktop
  1020.   openxlib "DLLGLUE.DLL"
  1021.   
  1022.   set closeDown = DLLGLUE(mNew, "USER.EXE", "PostMessage", "V", "WWWL")
  1023.   set getParent = DLLGLUE(mNew, "USER.EXE", "GetParent", "W", "W")
  1024.   
  1025.   set theParent = getParent(mCall,getParent(mWindowHandle))
  1026.   --put theParent
  1027.   set trueParent = getParent(mCall,theParent)
  1028.   
  1029.   --  put closeDown(mCall,trueParent,274,61472,0)
  1030.   
  1031.   getParent(mDispose)
  1032.   closeDown(mDispose)
  1033.   
  1034.   closexlib "DLLGLUE.DLL"
  1035. end
  1036.  
  1037. on fillbox obj_key
  1038.   if item 1 of obj_key = "vid" then
  1039.     set trans = "sub_" & item 2 of obj_key
  1040.     set prp to "prp_" & item 2 of obj_key
  1041.   else
  1042.     set trans = "sub_"&obj_key
  1043.     set prp = "prp_"&obj_key
  1044.   end if
  1045.   global clipcast
  1046.   global cliptitle
  1047.   set clipcast = trans
  1048.   set cliptitle to line 2 of field prp
  1049.   set the castnum of sprite 38 = cast trans
  1050.   
  1051.   set the rect of cast trans = rect(0,0, the width of sprite 25 - 22,94)
  1052.   set  the scrollTop of member trans = 0
  1053. end
  1054.  
  1055. on fillbox_old obj_key
  1056.   set the castnum of sprite 38 = cast "sub_win text"
  1057.   makepoptext(obj_key)
  1058.   
  1059.   set the rect of cast "sub_win text" = rect(0,0, the width of sprite 25 - 22,93)
  1060. end
  1061.  
  1062. on makepoptext obj_key
  1063.   global printtextcast,hbio,pcredit
  1064.   put current_pm & "," & "annotations" into ref_fld
  1065.   put current_pm & "," & "cap" into cap_fld
  1066.   repeat with x = 1 to the number of lines of field ref_fld
  1067.     set tmp to line x of field ref_fld
  1068.     if item 1 of obj_key = "vid" then
  1069.       set part2 = item 2 of obj_key
  1070.     else
  1071.       set part2 = obj_key
  1072.     end if
  1073.     if item 1 of tmp contains part2 then
  1074.       set hbio = item 2 of tmp
  1075.       set pcredit = line (integer(item 3 of tmp)) of field cap_fld
  1076.       delete item 1 of pcredit
  1077.       exit repeat
  1078.     end if
  1079.   end repeat
  1080.   
  1081.   if item 1 of obj_key = "vid" then
  1082.     set tscript = "tra_"&item 2 of obj_key
  1083.   else
  1084.     set tscript = "tra_"&obj_key
  1085.   end if
  1086.   
  1087.   if length(pcredit) < 1 then set pcredit = "none"
  1088.   
  1089.   if item 1 of obj_key = "vid" then
  1090.     put "" into pp
  1091.   else
  1092.     put  "PHOTO: "&pcredit&return&return into pp
  1093.   end if
  1094.   
  1095.   put pp&"Transcript:"&return&the text of cast tscript &return&return&"Commentator: "&return&field hbio into  field "sub_win text"
  1096.   
  1097.   set printtextcast = tscript
  1098.   
  1099.   
  1100. end